package com.ruoyi.mapper;

import com.ruoyi.domain.AdvReservbroadcast;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 【请填写功能名称】Mapper接口
 *
 * @author ruoyi
 * @date 2024-05-27
 */
public interface AdvReservbroadcastMapper
{

    @Delete("delete from  adv_reservbroadcast")
    public int clear();

    @Delete("delete from adv_reservbroadcast    where adv_members_id=#{advMembersId}")
    public int deleteByAdvMembersId(@Param("advMembersId") String advMembersId);
    /**
     * 查询【请填写功能名称】
     *
     * @param advReservbroadcastId 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    public AdvReservbroadcast selectAdvReservbroadcastByAdvReservbroadcastId(Long advReservbroadcastId);

    /**
     * 查询【请填写功能名称】列表
     *
     * @param advReservbroadcast 【请填写功能名称】
     * @return 【请填写功能名称】集合
     */
    public List<AdvReservbroadcast> selectAdvReservbroadcastList(AdvReservbroadcast advReservbroadcast);

    /**
     * 新增【请填写功能名称】
     *
     * @param advReservbroadcast 【请填写功能名称】
     * @return 结果
     */
    public int insertAdvReservbroadcast(AdvReservbroadcast advReservbroadcast);

    /**
     * 修改【请填写功能名称】
     *
     * @param advReservbroadcast 【请填写功能名称】
     * @return 结果
     */
    public int updateAdvReservbroadcast(AdvReservbroadcast advReservbroadcast);

    /**
     * 删除【请填写功能名称】
     *
     * @param advReservbroadcastId 【请填写功能名称】主键
     * @return 结果
     */
    public int deleteAdvReservbroadcastByAdvReservbroadcastId(Long advReservbroadcastId);

    /**
     * 批量删除【请填写功能名称】
     *
     * @param advReservbroadcastIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteAdvReservbroadcastByAdvReservbroadcastIds(Long[] advReservbroadcastIds);

    @Select("select adv_members_id as advMembersId, adv_broadcast_id as advBroadcastId from " +
            "adv_reservbroadcast where adv_members_id=#{advMembersId} and adv_broadcast_id = #{advBroadcastId}")
    AdvReservbroadcast isReservation(@Param("advMembersId") String advMembersId, @Param("advBroadcastId") String advBroadcastId);

    List<AdvReservbroadcast> getReservationList(@Param("advMembersId") String advMembersId);
}
